<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/restricted/template.xhtml">

        <ui:define name="title">MeteoCal - Events</ui:define>
        <ui:define name="titlePag">upcoming events</ui:define>
        <ui:define name="content">

            <ui:repeat var="evento" value="#{personalPageBean.eventsTakePart}" >

                <div class="searchPar">
                    <div class="eventoForm">
                        <h:form>
                            <h:commandLink action="#{navigationBean.redirectToEventPage()}" > 
                                <f:setPropertyActionListener target="#{personalPageBean.eventSelected}" value="#{evento}"/>
                                <div class="dateInfo">
                                    <div style="padding:3px;"><h:outputText value="#{evento.dateStart}">
                                            <f:convertDateTime pattern="dd/MM/yyyy"/>
                                        </h:outputText> 
                                        <h:outputText styleClass="eventName" value="#{evento.name}"/></div></div>
                                <div style="font-size: 15px">Where: #{evento.place}<br/>
                                    Hour: <h:outputText value="#{evento.dateStart}">
                                        <f:convertDateTime pattern="HH:mm" timeZone="Europe/Rome"/>            
                                    </h:outputText>
                                    <br/>
                                    Environment: #{personalPageBean.eventTypeIo(evento)} <br/>
                                    Type: #{personalPageBean.eventTypePp(evento)} <br/></div>
                            </h:commandLink>
                        </h:form>
                    </div></div>
            </ui:repeat>
        </ui:define>

    </ui:composition>
</html>
